<template>
  <h1>布局组件</h1>
  <!-- el-row固定了每一行都有24份 :span来控制当前el-col列占24份中的具体份数-->
  <!--:gutter天沟:其实就是每列自己的左右内间距padding-->
  <el-row :gutter="40">
   <el-col :span="8" style="border: 5px solid #f00">111</el-col>
   <el-col :span="8" style="border: 5px solid #f00">111</el-col>
   <el-col :span="8" style="border: 5px solid #f00">111</el-col>
  </el-row>
  <el-row :gutter="10">
    <el-col :span="12"><img src="imgs/rich.jpg" style="width: 100%;"></el-col>
    <el-col :span="12"><img src="imgs/rich.jpg" style="width: 100%;"></el-col>
  </el-row>
  <el-row :gutter="10">
   <el-col :span="4"><img src="imgs/rich.jpg" style="width: 100%;"></el-col>
   <el-col :span="4"><img src="imgs/rich.jpg" style="width: 100%;"></el-col>
   <el-col :span="4"><img src="imgs/rich.jpg" style="width: 100%;"></el-col>
   <el-col :span="4"><img src="imgs/rich.jpg" style="width: 100%;"></el-col>
   <el-col :span="4"><img src="imgs/rich.jpg" style="width: 100%;"></el-col>
   <el-col :span="4"><img src="imgs/rich.jpg" style="width: 100%;"></el-col>
  </el-row>
  <el-row :gutter="10">
    <el-col :span="4"><img src="imgs/rich.jpg" style="width: 100%;"></el-col>
    <el-col :span="8"><img src="imgs/rich.jpg" style="width: 100%;"></el-col>
    <el-col :span="12"><img src="imgs/rich.jpg" style="width: 100%;"></el-col>
  </el-row>
  <el-row :gutter="10">
    <el-col :span="3" v-for="item in 8">{{item}}</el-col>
  </el-row>

  <h3>列偏移</h3>
  <!--  :offset="日”默认左不偏移,写几就向右移动几列 -->
  <el-row>
    <el-col :span="20" :offset="2">
      <img src="imgs/rich.jpg" style="width:100%;">
    </el-col>
  </el-row>

  <h3>列嵌套</h3>
  <el-row>
    <el-col :span="12" style="border: 5px solid magenta;">111</el-col>
    <el-col :span="12" style="border: 5px solid magenta;">
      <!-- 嵌套时,一定要把当前元素再重新看作是一个新的el-row,还是24份,再进行分配! -->
      <el-row>
        <el-col :span="8" style="border: 5px solid blue;">111</el-col>
        <el-col :span="8" style="border: 5px solid red;">111</el-col>
        <el-col :span="8" style="border: 5px solid grey;">111</el-col>
      </el-row>
    </el-col>
  </el-row>
  <hr>
  <!-- 页面顶部是一个二级标题“我的主页”-->
  <h2>我的主页</h2>
  <!-- 第二部分是两列布局，左右比例为1:2，有间隔-->
  <el-row :gutter="20">
    <el-col :span="8" style="border: 5px solid blue;">111</el-col>
    <el-col :span="16" style="border: 5px solid blue;">
      <el-row>
        <el-col :span="8"><img src="imgs/rich.jpg" style="width: 100%;"></el-col>
        <el-col :span="8"><img src="imgs/rich.jpg" style="width: 100%;"></el-col>
        <el-col :span="8"><img src="imgs/rich.jpg" style="width: 100%;"></el-col>
      </el-row>
    </el-col>
  </el-row>
  <!-- 右侧区域内包含三张图片，每张图片平均分配宽度并排显示-->
  </template>

  <script setup>

  </script>


  <style scoped>

  </style>